Skip to content

Fix TFMs, exception args, stray semicolons, XML doc, and AGENTS.md from review feedback#45

Merged
mrdav30 merged 2 commits intodevelopfrom
copilot/sub-pr-44
Mar 4, 2026
Merged

Fix TFMs, exception args, stray semicolons, XML doc, and AGENTS.md from review feedback#45
mrdav30 merged 2 commits intodevelopfrom
copilot/sub-pr-44

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 4, 2026

Addresses all automated review comments from PR #44 covering invalid TFMs, misused exception constructors, no-op statements, missing docs, and stale agent instructions.

Changes

Project files

  • net8net8.0 in both FixedMathSharp.csproj and FixedMathSharp.Tests.csproj (invalid TFM caused silent restore/build failures)
  • Removed Microsoft.NETFramework.ReferenceAssemblies.net48 from both projects (no net48 target remains)

FixedQuaternion.cs

Fixed ArgumentOutOfRangeException constructors that were passing the interpolated message as paramName, resulting in a blank default message and a polluted ParamName:

// Before – message ends up as ParamName, actual message is default
throw new ArgumentOutOfRangeException($"Angle must be in the range ...");

// After – paramName and message are correctly separated
throw new ArgumentOutOfRangeException(nameof(angle), angle, $"Angle must be in the range ({-FixedMath.PI}, {FixedMath.PI}), but was {angle}");
throw new ArgumentOutOfRangeException(nameof(pitch), $"Euler angles must be in the range ..., but were ({pitch}, {yaw}, {roll})");

Bounds types

  • Removed stray no-op ; after switch statements in BoundingBox.cs, BoundingSphere.cs, and BoundingArea.cs
  • Filled in the empty <summary> for BoundingBox.Version

AGENTS.md

Updated build/test workflow, CI description, and serialization notes to reflect the current state: net8.0 primary TFM, dotnet test on both Linux and Windows, and MemoryPack replacing MessagePack/BinaryFormatter.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…s, XML doc, AGENTS.md

Co-authored-by: mrdav30 <11547347+mrdav30@users.noreply.github.com>
Copilot AI changed the title [WIP] Update .NET runtime support and serialization strategy Fix TFMs, exception args, stray semicolons, XML doc, and AGENTS.md from review feedback Mar 4, 2026
@mrdav30 mrdav30 marked this pull request as ready for review March 4, 2026 04:38
Copilot AI review requested due to automatic review settings March 4, 2026 04:38
@mrdav30 mrdav30 merged commit 600e379 into develop Mar 4, 2026
4 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses prior review feedback by correcting .NET target framework monikers, improving exception construction, cleaning up no-op statements, tightening XML docs, and updating contributor/agent guidance to reflect current build/test and serialization practices.

Changes:

  • Fix invalid TFMs (net8net8.0) and remove obsolete net48 reference-assemblies packages from both library and test projects.
  • Correct ArgumentOutOfRangeException usage in FixedQuaternion to avoid populating ParamName with message text.
  • Remove stray no-op semicolons after switch blocks, and improve XML documentation in bounds types; update AGENTS.md workflow/serialization notes.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/FixedMathSharp.Tests/FixedMathSharp.Tests.csproj Updates test TFM to net8.0 and removes net48 reference assemblies package.
src/FixedMathSharp/FixedMathSharp.csproj Updates library TFMs (net8.0) and removes conditional net48 reference assemblies package.
src/FixedMathSharp/Numerics/FixedQuaternion.cs Fixes exception constructor usage for angle validation paths.
src/FixedMathSharp/Bounds/BoundingSphere.cs Removes stray no-op semicolon after switch.
src/FixedMathSharp/Bounds/BoundingBox.cs Fills Version XML summary and removes stray no-op semicolon after switch.
src/FixedMathSharp/Bounds/BoundingArea.cs Removes stray no-op semicolon after switch.
AGENTS.md Updates build/test and serialization guidance to current state.
Comments suppressed due to low confidence (1)

AGENTS.md:18

  • AGENTS.md mentions an "exact matrix of OS/TFM combinations" in .github/workflows/dotnet.yml, but the workflow matrix currently varies only by OS and does not enumerate TFMs. Consider rewording this to avoid implying a TFM matrix (or update the workflow if a TFM matrix is intended).
- CI detail from `.github/workflows/dotnet.yml`:
  - Linux and Windows both run `dotnet test` against the supported TFMs (with `net8.0` as the primary test target).
  - Refer to the workflow file for the exact matrix of OS/TFM combinations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 410 to 416
// Check if the angles are in a valid range (-pi, pi)
if (pitch < -FixedMath.PI || pitch > FixedMath.PI ||
yaw < -FixedMath.PI || yaw > FixedMath.PI ||
roll < -FixedMath.PI || roll > FixedMath.PI)
{
throw new ArgumentOutOfRangeException($"Euler angles must be in the range ({-FixedMath.PI}, {FixedMath.PI}), but were ({pitch}, {yaw}, {roll})");
throw new ArgumentOutOfRangeException(nameof(pitch), $"Euler angles must be in the range ({-FixedMath.PI}, {FixedMath.PI}), but were ({pitch}, {yaw}, {roll})");
}
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FromEulerAngles validates pitch, yaw, and roll together, but the thrown ArgumentOutOfRangeException always uses paramName: nameof(pitch). If yaw or roll is out of range, ParamName will be misleading for callers. Consider splitting the checks and throwing with the specific offending parameter name, or use ArgumentException (or paramName: null) when the range constraint applies to multiple parameters at once.

Copilot uses AI. Check for mistakes.
@mrdav30 mrdav30 deleted the copilot/sub-pr-44 branch March 4, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants